home *** CD-ROM | disk | FTP | other *** search
- AUTOMATON*
-
- Sound_Waves
-
- This uses the HPP_Gas model to perform an experiment. A uniform gas is set
- up & into this inserted a compressed region (represented by a solid block
- of particles); this corresponds to the air surrounding the source of a loud
- burst of noise. As the automaton runs, we observe the compressive
- longitudinal wave spreading out from the centre; notice how we are
- temporarily left with a vacuum in the centre as the outward bound gas
- overshoots. With difficulty you may also be able to see that the incoming
- ripple which forms, then compresses the central region & bounces back out,
- to create a secondary outward bound wave front of lower intensity than the
- first. If you use a relatively small window (say 128x128) you will also
- observe patterns formed by the original wavefront wrapping around &
- interfering with the other waves.
-
- INITIALISATION*
-
- 10DEF PROCdo
- 20*SetEval wrap on
- 30*SetEval neig margolus
- 40ENDPROC
-
- SCREEN*
-
- 10DEF PROCdo
- 20PROCsoup(255,1,.5)
- 30c%=FNacol(255):GCOL c%AND63 TINT c%
- 40CIRCLE FILL 0,0,80
- 50ENDPROC
-
- CODE*
-
- ( READ_NEIG
- CELL OPP = IF (CW CCW = IF (CELL CW <> IF (CW ==)))
- OPP == )
-
- END*